﻿#ifndef CPUUSE_H
#define CPUUSE_H

#include <QBaseEntity>

class CpuUse : public QBaseEntity
{
    Q_OBJECT
    // 定义属性
    Q_PROPERTY(double selfUsageRate READ getSelfUsageRate WRITE setSelfUsageRate)
    Q_PROPERTY(double usageRate READ getUsageRate WRITE setUsageRate)
    Q_PROPERTY(QDateTime computeTime READ getComputeTime WRITE setComputeTime)
public:
    explicit CpuUse(QObject *parent = nullptr);


    double getUsageRate() const;
    void setUsageRate(double value);

    QDateTime getComputeTime() const;
    void setComputeTime(const QDateTime &value);

    double getSelfUsageRate() const;
    void setSelfUsageRate(double value);

private:
    double selfUsageRate; /**< 自身使用率*/
    double usageRate; /**< 使用率*/
    QDateTime computeTime; /**< 计算时间*/
};

#endif // CPUUSE_H
